<?php
$mod = 'yp';
define('MOD_ROOT', substr(dirname(__FILE__), 0, -7));
//require substr(MOD_ROOT, 0, -1-strlen($mod)).'includes/common.inc.php';

require_once 'global.func.php';
$head['title'] = $M['name'];
$head['keywords'] = $LANG['member_center'];
$head['description'] = $LANG['member_center'];
define('BUSINESSDIR', $M['url'].$M['businessdir'].'/');
require_once 'output.func.php';


// aming
//if(strpos($action, 'business') !== false){

$userid = $userid ? $userid : $_userid;
if(in_array($file, array('news','product','buy','company'))){

	/* $company_user_infos 获取企业会员信息 */
	$company_user_infos = $db->get_one("SELECT * FROM `".DB_PRE."member_company` WHERE `userid`='$_userid'");
	//$userid = $_userid;
	if(!$company_user_infos)
	{
		$MS['title'] = '您不是企业会员';
		$MS['description'] = '你可以做下面操作';
		$MS['urls'][0] = array(
			'name'=>'免费升级为企业会员',
			'url'=>url("?module=$module&file=company&action=member"),
			);
		$MS['urls'][1] = array(
			'name'=>'退出当前帐号，换其他帐号登陆',
			'url'=>url("?module=member&action=logout"),
			);
		$MS['urls'][2] = array(
			'name'=>'重新注册为企业会员',
			'url'=>'',
			);
		msg($MS);
	}
}

?>